package com.enjoyor.soa.traffic.rest.tsms.dubbo.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.enjoyor.soa.traffic.api.dto.tsms.RouteInfoDto;
import com.enjoyor.soa.traffic.api.service.dubbo.tsms.IDubboSchemeRehearseService;
import com.enjoyor.soa.traffic.rest.tsms.dubbo.ISchemeRehearseConsumeService;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

@Component
public class SchemeRehearseConsumeService implements ISchemeRehearseConsumeService {

	@Reference(version = "1.0.0", timeout = 10000)
	//@Reference(version = "1.0.0", timeout = 10000, url="dubbo://192.168.56.8:21241")
	private IDubboSchemeRehearseService iDubboSchemeRehearseService;

	@Override
	public ResultPojo getSchemeRehearseList(String browserId, String schemeBeginDate, String schemeEndDate, 
			boolean isDetail) {
		// TODO Auto-generated method stub
		ResultPojo resultPojo = new ResultPojo(); 
		resultPojo = iDubboSchemeRehearseService.getSchemeRehearseList(browserId, schemeBeginDate, 
				schemeEndDate, isDetail); 
		return resultPojo;
	}

	@Override
	public ResultPojo getPushServerUrl() {

		// TODO Auto-generated method stub
		ResultPojo resultPojo = new ResultPojo();
		resultPojo = iDubboSchemeRehearseService.getPushServerUrl();
		return resultPojo;
	}

	@Override
	public void getPushServer(double rout, String date, double times, String state, String browserId,
			boolean isrout, List<RouteInfoDto> routeInfoList) {
		iDubboSchemeRehearseService.getPushServer(rout, date, times, state, browserId, isrout, routeInfoList);

	}

}
